package org.spbsu.apco.server.scheduler.impl;

import org.spbsu.apco.common.task.core.Ticket;
import org.spbsu.apco.server.scheduler.BaseScheduler;

import java.util.Collection;

/**
 * User: solozobov
 * Date: 17.11.12
 */

public class NaiveScheduler extends BaseScheduler {
    @Override
    protected Ticket getTicketFor(String clientId) {
        final Collection<Ticket> ready = getReadyForExecutionTickets();
        if (ready.isEmpty()) {
            return null;
        }
        return ready.iterator().next();
    }
}
